|
Hi everybody !
I'd like to create a new component : a trackbar with several scrollers on it.
I think I should modify the original component, but I don't know how to add scrollers..
I thank you for your help
fp12
|
|
|
|
|
You migth consider searching CodeProject first. There are thousands of articles and just as much sample source code. A search on slider[^] yields several good results, like Audio Mixing Console Fader/slider Control[^].
Now what exactly to you mean by "a trackbar with several scrollers on it."? Do you mean the actual track bars? The easiest way would be to wrap several TrackBar controls in a UserControl , with properties to get and set the values of each. The TrackBar control - like most controls in Windows Forms - actually encapsulate Windows Common Controls - native controls that typically let you override behavior like painting and view, but not something so vast as expanding the number of trackbars for a component. A composite control (what I mentioned above) is a much better way of doing this.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
hai there,
By default the the progress bar direction is horizontal. i want it to be vertical. Any idea.
And if it is not possible you are free to use some groupbox or panel (nothing else).
What i mean by the above sentance is , you can put progress bar on panel or groupbox and can rotate it.
thanks in advance
Please feel free to contact.
Sreejith S S Nair - Bangalore
|
|
|
|
|
There is no vertical attrbiute for the Progress bar. You would either have to find a 3rd party control that does what you want, or create the control yourself, extending ProgressBar.
You can't use a groupbox or panel to rotate the image of the ProgressBar. I just don't see how your going to get the ProgressBar to paint properly in this case.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
i have created a unmanaged VC++ dll and then created a wrapper class for it . i have included this wrapper class in my c# by using add reference .The function takes ushort* as the input .i.e. i am should pass a string as an input to the function
Function Prototype is this:
void WCConvertImg(unsigned short __nogc * ,unsigned short __nogc *);
now that I am facing problem in passing parameter to this function. I tried first by using unsafe in C# and then with marshal class., I cannot assign the address of string variable to ushort * variable in C#, Its not allowed in managed code .
Regards
Gobu sk
|
|
|
|
|
CppClass::Foo(System::String *s)
{
const Char __pin* name = PtrToStringChars(s);
SomeSystemFunctionW(name) //W=WIDE (UnicodeVersion)
}
That way you'll get nice interface in c# .
|
|
|
|
|
when i try using the method i get this error
(30): error C2664: 'UnManagedImgConvert::ConvertImg' : cannot convert parameter 1 from 'const __wchar_t __pin *volatile __pin *volatile ' to 'WCHAR * '
ie i cant pass name pointer as a parameter to the to the unmanaged code
|
|
|
|
|
Thanks lesnikowski,
there is an alternative in c# we can use fixed(char * a=string variable).
i got it working.
Regards
gobu sk
|
|
|
|
|
Hi folks,
can somebody tell me why TextBoxes do not render the text (assigned through the Text property) properly when using new line escape sequence like in string s = "firstline\nsecondline"; . How can I solve this?
Thanks a lot in advance!
Matthias
If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)
www.emvoid.de
|
|
|
|
|
try using "firstline\r\nsecondline";.
|
|
|
|
|
Correct!
Thanks!
Matthias
If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)
www.emvoid.de
|
|
|
|
|
I would suggest to use
System.Environment.NewLine
to get the right newline for the system.
Greets
Roland
|
|
|
|
|
Hi,
I've created a MDI Form and placed a button control on it.
On clicking the button, a child form will be shown.
But the button control in the parent form is shown above the child form.
Is there any way to prevent this?
Thanks.
Vipin.
|
|
|
|
|
That's not exactly the best place for child controls. The Child forms actually reside inside a control on the MDI parent, called MDIClient. You can TRY to use the .SendToBack() method of the controls in question or you could try .BringToFront() on the MDIClient control. In order to get a reference to that control, though, you'll have to enumerate the Controls collection of the MDI parent form and search for a control of type MDIClient, for it has no Name.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi
Is there any way to get the exe name : "iexplore.exe" using the System.Diagnostics.Process or any other class?
Pls help me with sample cpodes, if any.
Problem is that, the code,
"processObj.MainModule.FileName" returns "explorer.exe" which is not the correct one, I think.
Cheers,
ganesh.
|
|
|
|
|
It's true that explorer.exe is not MS Internet Explorer (it's Windows Explorer). However, if IE is running at the time the processes are enumerated, iexplore.exe should also appear in the list. I used the following code to list the processes on my workstation, and it worked like a charm:
using System;<br />
using System.Diagnostics;<br />
<br />
class ProcEnumerator<br />
{<br />
[STAThread]<br />
static void Main(string[] args)<br />
{<br />
<br />
Process[] localProcess = System.Diagnostics.Process.GetProcesses();<br />
foreach(Process p in localProcess)<br />
{<br />
try<br />
{<br />
Console.WriteLine(p.MainModule.FileName);<br />
}<br />
catch(Exception excp)<br />
{<br />
Console.WriteLine("*** '{0}': {1} - may be a placeholder.", p.ProcessName, excp.Message);<br />
}<br />
}<br />
<br />
Console.ReadLine();<br />
}<br />
}
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Actually, "Internet Explorer" is the WebBrowser control, a culmination of MSHTML, urlmon, and several other components. The WebBrowser control can be used in any ActiveX container, which both iexplore.exe and explorer.exe are. If you, for example, started iexplore.exe and then browsed to a folder (like C:\), it functions like Windows Explorer. The reverse is true because Windows Explorer is an ActiveX container that can host the WebBrowser control (just like you can in a .NET application, VB6 application, and many other client application frameworks).
So, when the MainModule.FileName returns explorer.exe, it is correct (and it couldn't be wrong anyway - the OS has to know what's loaded into the process space otherwise nothing works).
DeskBand developers (like the Search bar, Media bar, etc.) like myself use this fact to make sure the band isn't initialized if the containing process is explorer.exe, for example (so that it is only loaded into what most people call "Internet Explorer").
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Agreed.
I interpreted the question as asking how to determine if iexplore.exe was executing. If the question is "How do I tell if any 'IE' components are currently hosted?" in a process started by explorer.exe, for instance, it would be a more difficult task to determine how much "IE"-ness the explorer.exe process displayed (searching the associated modules blah blah blah).
Thanks for the clarification.
Jared
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Use property ModuleName
Process[] ProcessList = Process.GetProcesses();
ArrayList ProcessNames =new ArrayList ();
foreach(Process myProcess in ProcessList)
{
String myString = myProcess.ProcessName ;
string myModuleName;
try
{
myModuleName= myProcess.MainModule.ModuleName;
}
catch
{
myModuleName = "no name available";
}
Console.WriteLine(myModuleName);
}
DavidR
|
|
|
|
|
Hi people,
Can you tell me is there any real difference between:
IMyObject obj = (IMyObject) otherObject; and
IMyObject obj = otherObject as IMyObject;
Thanks
Regards,
Serge (Logic Software, Easy Projects .NET site)
|
|
|
|
|
Serge Lobko-Lobanovsky wrote:
IMyObject obj = (IMyObject) otherObject;
Will throw an exception on conversion failure.
Serge Lobko-Lobanovsky wrote:
IMyObject obj = otherObject as IMyObject;
Will assign null on conversion failure.
Take a look at the documentation for as[^].
www.troschuetz.de
|
|
|
|
|
|
Hi,
I have a WinForms program with an IE browser object (AxBrowser) hosted within my program which I cast the loaded document as IHTMLDocument2 to use the MSHTML editing features.
Problem is that I cannot stop the IE object from asking (before navigating to another doc) if I want to save the document if it has changed. Does anyone know which interface within MSHTML i can use to intercept this dialog and suppress it.
Thanks in advance
Richard
|
|
|
|
|
in My C/S WinForm program, Client contacts with Server using Socket.and Both of them written in C#.
i want to modify the C/S mode to B/S mode because i dont want to install a WinForm program at client. i would like to implement the same function at client using Browser.
i need drawing graphic/winform controls and many others.
do there have good solution in this case ?
And aslo i dont want to install CLR at client.
|
|
|
|
|
C/S ?? B/S ??
By this do you mean Client/Server and Browser/Server? If so, you do know that a browser is just a type of client.
If you don't want to install the CLR on the client then you cannot draw graphics and WinForm controls on the client.
If you want to convert your client code to be usable in a browser you are going to have to re-write the client as an ASP.NET application and host it on a server. The major architectural difference between ASP.NET applications and WinForms applications is that ASP.NET is stateless which means that your presentation layer cannot be ported easily and you will need to think about re-designing how it interacts with the user.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
My Blog
|
|
|
|