| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1951 人关注过本帖
标题:我想请问从网页上复制下来的代码,为什么文本改了VBS格式以后打不开,提示语 ...
只看楼主 加入收藏
guoguo893551
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2020-5-25
收藏
 问题点数:0 回复次数:0 
我想请问从网页上复制下来的代码,为什么文本改了VBS格式以后打不开,提示语法错误呢?
<Window x:Name="closing" x:Class="BBdemo.MainWindow"
        xmlns="http://schemas.
        xmlns:x="http://schemas.
        xmlns:d="http://schemas.
        xmlns:mc="http://schemas.
        xmlns:local="clr-namespance:BBdemo"
        mc:lgnorable="d"
        Title="MainWindow" Height="450" width="800" Closing="closing_Closing">
    <Grid>
         <Grid.Background>
             <ImageBrush/>
         </Grid.Background>
         <Button Name="btal" Content="同意" HorizontalAlignment="Left" Margin="168,326,0,0
VerticalAlignment="Top" Width="93" Height="42" Click="Button_Click"/>
         <Label name="labl" Content="表白信" HorizontalAlignment="Left" Margin="33,44,0,0
VerticalAlignment="Top" Height="59" Width="129" FontSize="36" FontStyle="ltalic"/>
         <Labol  Name="lab2" Content="做我女朋友好吗? : : :"
HorizontalAlignment="Left" Height="60" Margin="493,200,0,0" VerticalAlignment="Top"
Width="281" FontSize="36"/>
         <Button Name="btn3" Bisibility="Hidden" Content="退出" HorizontalAlignment="Left"
Height="42" Margin="326,326,0,0" VerticalAlignment="Top" width="90" Click="Button_Click_1"/>
         <Imago Margin="206,10,316,6,109" Source="biaobal.png" Stretch="Fill"/>
         <Button Name="btn2" Content="不同意" HorizontalAlignment="Left"
Margin="493,326,0,0" VerticalAlignment="Top" Width="93" Heigth="42"
MouseEnter="Button_MouseEnter"/>
     </Grid>
</Window>







using System:
using System,Collections.Generic:
using System.Ling:
using System.Text:
using System.Threading.Tasks:
using System,Windows:
using System.Windows.Controls:
using System,Windows.Data:
using System,Windows.Documents:
using System,Windows.Input:
using System,Windows.Media:
using System,Windows.Media.Imaging:
using System,Windows.Navigation:
using System,Windows.Shapes:


namespace BBdemo
{
    ///<summary>
    ///MainWindow.xaml 的交互逻辑
   
   
    ///</summary>
    public partial class MainWindow : Window
    {
         public MainWindow{}
         {
              InitializeComponent{}:
         }
         
         private void Button_MouseEnter(object sender. MouseEventArgs e)
         {
              Random rd = new Random():
              Button bta = sender as Button:
              double maxW = this.Width:
              double maxH = this.Height:
              double w = btn.Width:
              double h = btn.Height:
              double l = rd.Next(0. (int)(maxW-w)):
              double t = rd.Next(0. (int)(maxH - h)):
              bth,Margin = new Thickness(l,t,0,0):
              }
              
         private void closing_Closing(object sender, e)
         {
              MessageBox.Show("关不掉!”):
              e.Cancel = true:
        }
         private void Button_Click(object sender, RoutedEventArga e)
         {
              labl.Visibility = System.Windows.Visibility.Hidden:
              lab2.Content = "谢谢媳妇!":
              btn3.Visibility = System.Windows.Visibility.Visible:
              btn1.Visibility = System.Windows.Visibility.Hidden:
              btn2.Visibility = System.Windows.Visibility.Hidden:
        }
        
         private void Button_Click_1(object sender, RoutedEventArgs e)
         {
              System.Environment.Exit(0):
        }
搜索更多相关主题的帖子: Content System double Windows using 
2020-05-25 15:38
快速回复:我想请问从网页上复制下来的代码,为什么文本改了VBS格式以后打不开, ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018451 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved