|
there are many forms like style form password change, but I do not want the user to be able to drag the form dialogue around by the title bar. I also find source code in the library C# but I'm not found source code.
|
|
|
|
|
form password change only as example because there are many forms like this, but I do not want the user to be able to drag the form dialogue around by the title bar.
|
|
|
|
|
Easiest way is to not show the title bar: set FormBorderStyle to None and there will be no title to drag it with - this also removes the menu, maximize, minimize, and close buttons.
Alternatively, override WndProc:
private const int WM_NCLBUTTONDOWN = 161;
private const int WM_SYSCOMMAND = 274;
private const int HTCAPTION = 2;
private const int SC_MOVE = 61456;
protected override void WndProc(ref Message m)
{
if ((m.Msg == WM_SYSCOMMAND) && (m.WParam.ToInt32() == SC_MOVE)) return;
if ((m.Msg == WM_NCLBUTTONDOWN) && (m.WParam.ToInt32() == HTCAPTION)) return;
base.WndProc(ref m);
}
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
hii all, how to combine a visual solution in c # 2008
I have two until three windows solution and how to combine to the C# 2008 and build to one solution. thanks
|
|
|
|
|
You can't combine the solutions, but you could make one solution with all the projects. Projects can even be included in multiple solutions if you like.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
Right-click the solution line (top line) in Solution Explorer and click Add, then open the project file for the project you want to add to the solution.
Alternative is to open the solution you want to add these projects to then click the File menu and Add, Existing Project.
|
|
|
|
|
whether file.cs all transferred to an existing folder and how to keep everything to connected properly
|
|
|
|
|
The files are not moved. They stay right where they are before you added the project to the solution. There's nothing to "keep connected".
|
|
|
|
|
Hello,
I was wondering if it was at all possible to transform a set of values into graphical on the debug window (black screen). I am new this stuff and I have never seen it done myself. I was just wondering how someone would go about attempting to turn a set of values into graphical form. I thought of the graphical form because it is much easier to look at graph to see a behavior than it is to read through hundreds of numbers. Thanks.
|
|
|
|
|
If you're talking about the Debug window in Visual Studio, no, it's not. It doesn't support graphic images.
If you're still talking Visual Studio and you're talking about the little window that shows up when you hover the mouse of a variable, then you can replace that with a different visualizer. You can create your own custom visualizers to display data type any way you want. Debugger Visualizers[^]
|
|
|
|
|
If one is limited to basically "text" output, one can create a graph of sorts by outputting lines of various lengths; e.g.
List<Tuple<string, int>> values = new List<Tuple<string, int>>() {
new Tuple<string,int>("Apples", 3),
new Tuple<string,int>("Peaches", 5),
new Tuple<string,int>("Pumpkins", 10),
new Tuple<string,int>("Pies", 7)
};
foreach ( Tuple<string, int> t in values ) {
Console.WriteLine( "{0,10}: {1}", t.Item1, "".PadRight( t.Item2, '*' ) );
}
|
|
|
|
|
Hello,
Pardon me if my question's answer is an obvious one but i really can't seem to figure out how to fix this.
I'm a newbie in mvc and i got this whole bunch of code from my senior.
It has a drop down list which gets the data from a database. Anyways, my problem is how to filter the drop down list in a way that the choices displayed are filtered based on the characters being typed.
For example, if I type in 'A' all items starting with 'A' should be displayed and at the bottom will be the items which contains 'A' (kind of in a sorted way).
Any help, ideas and suggestions will be very appreciated.
For any clarifications please kindly inform me. Thanks a lot guys
|
|
|
|
|
|
I am trying to get my head around LINQ and am going through some old code to practice, below is some code that i want to convert but cannot work out how to do it.
anyone have any ideas please.
Reading a csv file, getting first element only with some blank lines and should be able to populate combobox with something like:
cboSiteLocation.Items.AddRange(lines.ToArray());
using (StreamReader sr = new StreamReader(filepath))
{
IEnumerable<string> lines = File.ReadLines(filepath);
string[] element;
foreach (string line in lines)
{
if (!string.IsNullOrEmpty(line))
{
element = line.Split(',');
this.cboSiteLocation.Items.Add(element[0].Trim());
}
}
}
Thanks in advance
|
|
|
|
|
Are you looking for something like this perhaps?
IEnumerable<string> output = File.ReadAllLines(@"C:\Course\socket.io\example1Copy\views\index.jade")
.Where(x => !string.IsNullOrWhiteSpace(x))
.Select(x => x.Split(new char[]{' '}, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault());
|
|
|
|
|
Yes thank you, exactly what i wanted.
|
|
|
|
|
You are welcome. Glad to help.
|
|
|
|
|
Hey guys i need help with a program im working on.
I have two WPF Windows, one is for entering information which will load the entered info into the second window.
And depending on what option selected in the combobox it must load a logo at the top of the second window and its related address below it.
Thanks
The Layout:
Mainwindow:
<Window x:Class="Other_Stuff.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Entry Form" Height="350" Width="525">
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="45"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="7*"></ColumnDefinition>
<ColumnDefinition Width="36*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="0" Content="Client"></Label>
<Label Grid.Column="0" Grid.Row="2" Content="Pharmacy" Margin="-5,5,5,5"></Label>
<Label Grid.Column="0" Grid.Row="3" Content="Script Number"/>
<Button x:Name="Submit" Grid.Column="0" Grid.Row="4" Content="Submit" Click="Button_Click"/>
<TextBox Name="client" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"></TextBox>
<ComboBox Name="PharmacyComboBox" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2" Margin="0,0,0,10" >
<ComboBoxItem Content="Dischem" ></ComboBoxItem>
<ComboBoxItem Content="Clicks" MouseLeftButtonUp="ComboBoxItem_MouseLeftButtonUp"></ComboBoxItem>
</ComboBox>
<TextBox Name="Scriptnumber" Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2" Height="55" VerticalAlignment="Top" Margin="5,0,0,0">
</TextBox>
<Label Content="Medicine" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,10,0,0" Grid.Row="1"/>
<ListBox Grid.Column="1" HorizontalAlignment="Left" Height="45" VerticalAlignment="Top" Width="397" Grid.ColumnSpan="2" Grid.Row="1" Name="medlist" Margin="0,5,0,0" Grid.RowSpan="2"/>
<!--<Button Content="Submit" Grid.Column="1" Grid.Row="5" Click="Button_Click" Grid.ColumnSpan="2"></Button>-->
</Grid>
</Window>
ScriptWindow:
Window x:Class="Other_Stuff.Script"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Script" Height="488.06" Width="437.313" Loaded="Window_Loaded">
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="45"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="7*"></ColumnDefinition>
<ColumnDefinition Width="36*"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Grid.Row="0" Name="LogoImage" Grid.ColumnSpan="3" Margin="0,2,0,43" Grid.RowSpan="2"></Image>
<Label Grid.Row="1" Grid.RowSpan="2" Name="AdresslbLabel" Grid.ColumnSpan="3"/>
<Label Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3" Name="ScripTextBox"></Label>
<DataGrid Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"/>
<TextBox Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3" Name="RelatedTextBox"/>
<Image Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Grid.RowSpan="2" Name="AdverTextBox"/>
<Button Content="Button" HorizontalAlignment="Left" Margin="10,10,0,0" Grid.Row="7" VerticalAlignment="Top" Width="100" Height="39" Click="Button_Click"/>
</Grid>
</Window>
|
|
|
|
|
Well, you could try the WPF forum: http://www.codeproject.com/Forums/1004257/Silverlight-WPF.aspx[^]
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
You would have been better off posting this in the WPF forum - WPF / Silverlight[^]. Secondly, you haven't really asked a question or told us where you are stuck. Thirdly, when you put code into a post, you should use pre tags so that your code retains it's formatting (use the code menu item above the post entry box). It's also much easier to read.
Everyone dies - but not everyone lives
|
|
|
|
|
the address needs to be retrieved from a database
|
|
|
|
|
Always format the code using Code-block. You have posted the same question at silverlight forum without formatting the code.
|
|
|
|
|
|
Hi, I want to get the inner text of this single line xml. I have parsed a properly written xml document, but I can't figure out how can I parse this single line.
<double xmlns="http://www.somewebservice.com/">168.0543</double>
|
|
|
|
|
Try a regex:
(?<=\<.+\>)([^<]+)(?=\<.*\>)
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|