|
Actually i am developing a dialog like datalink dialog. The user has to select first what provider he wants. According to that provider i have to display next page of the tabcontrol how can i do that
Please explain in brief
Thanx in advance
Regards
INAM
Inam
|
|
|
|
|
tabCtl.SelectedIndex = listbox.SelectedIndex;
or
tabCtl.SelectedTab = tabpage;
|
|
|
|
|
How do I clear screen from a C# console application? Does it involve using P/invoke. THank cyril
|
|
|
|
|
Try this : http://support.microsoft.com/default.aspx?scid=kb;en-us;Q319257
|
|
|
|
|
its very urgent regarding datagrid. i want to put combobox in the datagrid. i have search the web and codeproject but normally these are set with Dock style "Fill" but infact i want without of this. I also want to
bind datagrid with the Datatable. Is this possible without using the "DatagridTableStyle" class.
Kindly friends tell me many ways so that i will select best i want.
Thanks and regards
Muhammad Sarfraz
|
|
|
|
|
Using a DataGridColumnStyle is the best way to do this. That's what they're there for - to customize the data-bindable cells in a DataGrid . There's an easy article about this in MSDN posted a few months ago at http://msdn.microsoft.com/msdnmag/issues/03/08/DataGrids/default.aspx[^].
If you don't want to use this mechanism, then handle the DataGrid.CurrentCellChanged event, determine if you should show a ComboBox for the current cell, then add a ComboBox to the DataGrid 's container's Controls collection with a higher TabStop than the DataGrid , and size the ComboBox to match the cell's extents. This is a really poor way of handling this and I'm not guaranteeing that it'll work.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I’m using a simple print template: http://www.webreference.com/js/column92/7.html. I programmatically set the orientation to landscape by adding the following to the code that gets executed immediately on pageLoad:
printer.orientation = “landscape”;
alert(printer.pageHeight + “ ” + printer.pageWidth);
The expected result should be an alert that displayed (850 1100). However the page orientation is not properly updated and the alert displays (1100 1100). The width of the page is updated properly, but the width is not. The settings is actually updated in PageSetup but isn’t properly refreshed in the UI. After displaying the PageSetup and closing the dialog the UI is properly refreshed.
I need to get the orientation to work properly in the UI without any problems.
|
|
|
|
|
Hi there, just wondering how i would export my c# code (from .NET) as an executable?
|
|
|
|
|
CTRL-B
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
If you don't have VS.net you can use the command line. csc.exe Here's the docs
Microsoft (R) Visual C# .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.0.3705
Copyright (C) Microsoft Corporation 2001. All rights reserved.
Visual C# .NET Compiler Options
- OUTPUT FILES -
/out:<file> Output file name (default: base name of file with main class or first file)
/target:exe Build a console executable (default) (Short form: /t:exe)
/target:winexe Build a Windows executable (Short form: /t:winexe)
/target:library Build a library (Short form: /t:library)
/target:module Build a module that can be added to another assembly (Short form: /t:module)
/define:<symbol list=""> Define conditional compilation symbol(s) (Short form: /d)
/doc:<file> XML Documentation file to generate
- INPUT FILES -
/recurse:<wildcard> Include all files in the current directory and subdirectories according to the wildcard specifications
/reference:<file list=""> Reference metadata from the specified assembly files (Short form: /r)
/addmodule:<file list=""> Link the specified modules into this assembly
- RESOURCES -
/win32res:<file> Specifies Win32 resource file (.res)
/win32icon:<file> Use this icon for the output
/resource:<resinfo> Embeds the specified resource (Short form: /res)
/linkresource:<resinfo> Links the specified resource to this assembly (Short form: /linkres)
- CODE GENERATION -
/debug[+|-] Emit debugging information
/debug:{full|pdbonly} Specify debugging type ('full' is default, and enables attaching a debugger to a running program)
/optimize[+|-] Enable optimizations (Short form: /o)
/incremental[+|-] Enable incremental compilation (Short form: /incr)
- ERRORS AND WARNINGS -
/warnaserror[+|-] Treat warnings as errors
/warn:<n> Set warning level (0-4) (Short form: /w)
/nowarn:<warning list=""> Disable specific warning messages
- LANGUAGE -
/checked[+|-] Generate overflow checks
/unsafe[+|-] Allow 'unsafe' code
- MISCELLANEOUS -
@<file> Read response file for more options
/help Display this usage message (Short form: /?)
/nologo Suppress compiler copyright message
/noconfig Do not auto include CSC.RSP file
- ADVANCED -
/baseaddress: Base address for the library to be built
/bugreport:<file> Create a 'Bug Report' file
/codepage:<n> Specifies the codepage to use when opening source files
/utf8output Output compiler messages in UTF-8 encoding
/main:<type> Specifies the type that contains the entry point (ignore all other possible entry points) (Short form: /m)
/fullpaths Compiler generates fully qualified paths
/filealign:<n> Specify the alignment used for output file sections
/nostdlib[+|-] Do not reference standard library (mscorlib.dll)
/lib:<file list=""> Specify additional directories to search in for references
|
|
|
|
|
I have some questions about Hooks.
I can do local hooks in C#,but what can I do in journal Hooks,I must know entry for DLL and the address of the procedure of my process functions.If we can do it in C#
please give me a sample.
thank you
sdfasd
|
|
|
|
|
I'm looking for some documentation on core system DLL's (in XP).
I've been trawling search engines looking for the method specs, but had no joy. Does anyone know where I could find something like this?
Cheers
Cata
|
|
|
|
|
We'll just go on MSDN : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/windows_api_start_page.asp
|
|
|
|
|
|
Thanks guys, found all the stuff I was looking for and more
Cheers
Cata
|
|
|
|
|
hi
can anyone send me the source code of flow diagram?
it is very important for me.
best regards.
|
|
|
|
|
Your not too clear on this.
Do you need source code for a flow diagram control?
|
|
|
|
|
I have some sample code Heath (Stewart) may recognise it, as it's from his Icon Extraction sample.
Anyway, I'm confused about the use of the | operator with enumerations.
<br />
[DllImport("shell32.dll", CharSet=CharSet.Auto)]<br />
private static extern IntPtr SHGetFileInfo(<br />
string path,<br />
int fileAttributes,<br />
[MarshalAs(UnmanagedType.Struct), Out]out SHFileInfo info,<br />
int fileInfoSize,<br />
[MarshalAs(UnmanagedType.U4)]SHGFI flags);<br />
First is the use of the SHGFI Flags, which I take as wanting to use the Hex values as handles or refferences or pointers or something. I'm sure I'll figure it out.
The next part is:
<br />
IntPtr retVal = SHGetFileInfo(filename, FILE_ATTRIBUTE_NORMAL,<br />
out info, Marshal.SizeOf(typeof(SHFileInfo)),<br />
SHGFI.AddOverlays | SHGFI.DisplayName | SHGFI.Icon | SHGFI.SmallIcon<br />
| SHGFI.TypeName | SHGFI.UseFileAttributes);<br />
Now, how does the | operator in this work? Is it actualy an or statement? Or a collection of flags from the enumeration? If so, what effect does the | charachter have?
Thanks guys
Cata
|
|
|
|
|
The_Catalyst wrote:
Now, how does the | operator in this work? Is it actualy an or statement? Or a collection of flags from the enumeration? If so, what effect does the | charachter have?
The latter, it behave like flags. A bit-wise OR iow.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
How do flags work? What is the OR required for? What do flags represent? Hex numbers paired with ordered values from an enumeration?
Cheers
Cata
|
|
|
|
|
The bitwise OR operator combines the bits of two values into one value, making each bit that is "1" in either value be "1" in the new value, and any bit that's "0" in both be "0" in the new value. So, you're using each bit to represent a "flag" instead of having lots of boolean (true/false) values, one for each flag.
So, if you had the flags 1, 2, & 4, and OR'ed them together, each bit would represent a flag, and it would look like this (where r = result):
binary
value value
--------------
1 = 00000001
2 = 00000010
4 = 00000100
--------------
r = 00000111
|
|
|
|
|
How do flags work? What is the OR required for? What do flags represent? Hex numbers paired with ordered values from an enumeration?
Cheers
Cata
|
|
|
|
|
Dear, Sir.
How to convert "string" type to "Shortcut" type ?
For example
convert the strings, "CtrlM", "CtrlN", "CtrlO", "CtrlP", etc to Shortcut type.
Thank you.
|
|
|
|
|
You're lucky c# has an enum parse feature
you can use this:
System.Windows.Forms.Shortcut s = (System.Windows.Forms.Shortcut)Enum.Parse(typeof(System.Windows.Forms.Shortcut), "Alt1");
|
|
|
|
|
The method that the post above mentions works for some but not all shortcuts (AFAIK). The preferred method is to use the KeyConverter class (in System.Windows.Forms) to do this. It does not take strings like "CtrlM", but it will take strings like "Ctrl+M" or "Ctrl+Shift+M".
|
|
|
|