|
Hello,
Is there a way to set the background color for a MenuItem without using p/invoke?
Thanks in advance.
Standards are great! Everybody should have one!
|
|
|
|
|
Overriding the DrawItem or Paint method?
|
|
|
|
|
I've tried to but that doesn't work. DrawItem and Paint never get called. Hooking up to the drawitem event from the constructor doesn't help either, since the event never seems to fire. I suspect the control gets painted by its parent container...
Standards are great! Everybody should have one!
|
|
|
|
|
hi all,
I am using a windows application to create a reminder. I am using Ms Access as my backend.I need a help in a query in access.
i need to check the time values in access.For eg,i need to fetch the records which satisfy the following
select * from events where event_time=12:24 AM
Can anyone help me with a query in access(the query i tried in sql is not working for access)? The query should check for both hour and minutes
Thanks in advance
Regards
Anuradha
|
|
|
|
|
Dear
First the field "event_time" must be of data type "Date/Time" (This must be set within the Access Table "events")
Then, you shoul dnote that the Date/Time data types are dealt with differently
the statement will be somthing like this
SELECT * FROM events
WHERE evet_time = #12:24 AM#
Regards
GoudaSharp
Mohamed Gouda
Developer
|
|
|
|
|
hello,
I have a pci card and i have the path of the port in a string value (//.////)
in the write file func the value "hport" is in intptr;
1) I would happy if someone give an example of using in the fnction WriteFile
2) how I convert STRING TO INTPTR
|
|
|
|
|
Hi,
this is an example that writes a text string to a pipe using WriteFile.
For P/Invoke you can have several prototypes with different sets of arguments;
there is no need to convert to IntPtr yourself.
BTW if you provide a string or StringBuilder it will convert Unicode to 8-bit ASCII
by default.
private void SendString(StringBuilder sb) {
IntPtr pipe2=CreateFile(pipeName, GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
Thread.Sleep(200);
int count;
bool OK=WriteFile(pipe2, sb, sb.Length, out count, 0);
if (!OK) ... report error
ClosePipe(pipe2);
}
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool WriteFile(
IntPtr hHandle,
StringBuilder lpBuffer,
int nNumberOfBytesToWrite,
out int lpNumberOfBytesWritten,
uint lpOverlapped
);
|
|
|
|
|
I Have a web service listner. Another web service calls a function , say...
Myfunc. I return success when i am done and the process starts again.
i would like to track some data when Myfunc is called that i can use for validation on subsequent calls to Myfunc. Using memory will not work because if i store some data on call 1 to Myfunc, in an array list, on the subsequent call to Myfunc, that data is gone.
What is the quickest, way to get around this?
Is it Threads? If so, can someone give me some guidance on threads in C#
Or is it simply to write to a file before i return success, then read from the file when Myfunc gets called again. In that way, i always have current data?
|
|
|
|
|
Define the array list as "public shared", I think it not clear when subsequent call.
|
|
|
|
|
So public shared, keeps the memory and will not loose it on subsequent calls?
Remember the web service is like a dll.
Are you sure this would work?
|
|
|
|
|
|
public shared is a VB concept.. Does not work in C#
|
|
|
|
|
If u convert "Public Shared ABC As String()"code of vb to C# will find this "public static string[] ABC;" so test this one working for u.
|
|
|
|
|
Hi all,
I'm using the standard open file dialog of windows in my c# application. The problem is, I want the dialog to show a thumbnail preview of the html files of the current directory . How can I do that?
thanking you in advance,
jaz
|
|
|
|
|
|
Hi Giorgi Dalakishvili,
Thanks for your reply..
but i am looking for an template browser that shows thumbnails of templates (saved as html files not images)... do u have any other solutions.
Thanks once again
jaz
|
|
|
|
|
But you will definitely need openfiledialog with picturebox won't you? You now to find out how to get thumbnail from website. Google is your friend
|
|
|
|
|
hi,
thanks,
u r correct , i need openfiledialog with picturebox...
but without getting thumbnail from a html file my idea will not work...
I tried google.. and i got openfiledialog with picturebox but not a single example or idea about getting the thumbnail view of a html file..
Can u giv me someidea ????????
Thanks;)
jaz
|
|
|
|
|
|
hi ,
Thanks ;);)
thank you very muchhhhhhhhhh
jaz
|
|
|
|
|
You are welcome Just get used to searching cp and Google. You will find many useful things
-- modified at 8:57 Monday 14th May, 2007
|
|
|
|
|
Could someone help me with this problem :
Try this: open import dialog, the form that let you to locate the XML file on hard drive. Create a folder, then try to delete this folder - you'll end up with this Loader Lock message: Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang. ImportHierarchyView.cs, line 86
10x
|
|
|
|
|
Hi all,
Is there any way to get webBrowser.DocumentText for a web page that has different Frames.
Each frame has different data. I need to access one specific frame and want to access data. But
webBrowser.DocumentTex gives only brief info about frames not the details.
That page has header, Search, toc Frames.
Please guide me extract data from a specific frame
Thanks Bye
Bajrang
Using .net 2.0 (VS2005)
|
|
|
|
|
Dear All,
In Asp.net with C#, to protect of viewing the file which is available in file server, using the url of the file location, Files are available in one common share folder which is accessed thru Virtual directory, so need help of this regarding
regards,
eswar
|
|
|
|
|
Hi,
I am using Wince 5.0 with VS2005. I have created user control and on click event i am creating new label and showing it on control.like this
Label newPanel = new Label();
newPanel.Visible = true;
newPanel.Left = 0;
newPanel.Top = newLabel.Height;
newPanel.BackColor = Color.Blue;
newPanel.Width = this.Width;
newPanel.Height = this.Height - newLabel.Height;
newPanel.Parent = this.Parent;
newPanel.Anchor = (AnchorStyles.Left | AnchorStyles.Bottom |
AnchorStyles.Right | AnchorStyles.Top);
newPanel.Show();
this.Controls.Add(newPanel);
then i want to use this control on Form,so i created the device application and droped my control on Form,after clicking on control i can see the new labe on control but after rebuilding the application the label disappears.
I want to create some more such labels dynamically on my conrol.
how to add dynamically created control inside the usercontrol??
Thanks
Tushar
|
|
|
|