|
No. You misunderstand.
Your OP was worded, to me at least, as though you were attempting to use the work of someone else (the cookie) for your own purposes.
This sounds, again to me, a bit suspicious. The sort of thing a virus program might try to do, for example.
I am probably totally wrong about that, but I was trying to suggest to you that a more detailed explanation of what you are trying to do, might get more responses.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Duh!
Our intranet webserver intentionally provides a cookie for internal purposes and i wish to use this as windows authentication token,
Wondering if this is possible.
Before c# there was darkness
|
|
|
|
|
Ah. I now understand.
I regret that I am unable to help you, but I hope that someone else will.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hmm seems like an IO issue - finding the cookie folder may be a challenge. I'm pretty sure you should be able to read and parse the cookie in a winforms app. Is there a namespace aspx uses for it's helper functions, you may need to reference that.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Hello.
I have a DataGrid with a DatagridBoolColumn and DatagridComboboxColumn. I need to hide the DatagridComboboxColumn when the value of DatagridBoolColumn is False. Is there a way to do this?
Please help me!
modified on Tuesday, April 28, 2009 2:22 AM
|
|
|
|
|
DatagridComboboxColumn.Visible = false;
try that
modified on Tuesday, April 28, 2009 7:14 AM
|
|
|
|
|
hopingToCode wrote: DatagridComboboxColumn.VisableVisible = false;
Fixed that for you.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thank you getting to lazy and relying on inti sense
|
|
|
|
|
hi..
this single line code will do..
DatagridComboboxColumn.Visible = false;
"DatagridComboboxColumn" this will change according to the name of column u set.
with
rgrds
ageesh M
|
|
|
|
|
Hello,
For several applications I've written, I use a TrackBar and a TextBox to modify a particular value. I want these controls to be synchronized, so when the TrackBar is scrolled, the value in the TextBox is updated, or when the user types a value in the TextBox , the TrackBar automatically scrolls. Also, I typically want to fire an event when the value of this field is modified. Right now I'm using the ValueChanged event for the TrackBar and the TextChanged event for the TextBox , like so:
private void trackBar1_ValueChanged(Object sender, EventArgs e)
{
textBox1.Text = trackBar1.Value.ToString();
DoSomething();
}
private void textBox1_TextChanged(Object sender, EventArgs e)
{
int value = trackBar1.Value;
if(int.TryParse(textBox1.Text, out value))
{
trackBar1.Value = value;
}
}
private void DoSomething()
{
}
Is this the correct way to handle this situation, or is there a better way?
Thanks,
Dybs
|
|
|
|
|
Hi,
some of the .NET Controls (and I can't remember which) do fire a Changed event when data gets assigned even when the new data has the same value as the old one (so it wasn't really changed).
Therefore it is a good practice to have an if(newValue!=oldValue) {...} around the entire content of the Changed handler (which also means you have to remember the old value in a class member).
Calling DoSomething() from only one handler should then be sufficient to make sure it gets called only once for each real value change.
|
|
|
|
|
Luc,
My experience with TextBox and TrackBar (the only 2 controls this has been an issues for me so far) is they only fire the Changed event when the value actually does change. Although I left it out in my previous post, in my production code for the TextChanged handler, I do check
int textVal = int.Parse(textBox1.Text)
if(trackBar1.Value != textVal)
{
trackBar1.Value = textVal;
}
Thanks,
Dybs
|
|
|
|
|
hi everybody.pleeeeeeeeease help me! i am working on a real project that i need to read data from a serial port(com) and draw some graphs.the data are comming from a device that measures decible of the room.i have some questions and problems as it is my first project:
1.in windows application , in C#,how could i read the data?which code should i use?
2.what is the type of data that i get?is it binary?i do not know about rs232.
3.could i test my project in visual?i mean ,should i really connect the real device to get data or i can use the "serial port control " that is in tools>components and not use the real "com" port ?if so tell me how plz.
thanks.
|
|
|
|
|
Hi,
the SerialPort class is what you need to communicate with your device over RS232C.
The communication will use whatever format the designers of your device have chosen.
Sending data is the easy part, receiving it is more difficutl as it will arrive asynchronously, which means it gets in in bursts that don't necessarily follow the borders of your messages, and it will be received on a separate thread, so you will need Control.InvokeRequired/Control.Invoke pattern.
IMO If you are new to programming, this would not be a good idea for a first project.
|
|
|
|
|
thanks but as i said i "have" to do this an i really want info in details.please someone help me.what should i do from the first?
regards
|
|
|
|
|
As Luc mentioned above, the .NET SerialPort class is what you want to use. Depending on how your device is sending data, you may be able to use the various Read methods (Read, ReadLine, ReadTo, ReadByte) . I would suggest reading the MSDN documentation[^]. The bottom of the main Serial Port page has a sample app in C#, and below that is a link to "Serial Port members". This will list all the functions and properties available to you. Each function has VB and C# examples that should help get you started.
Dybs
|
|
|
|
|
dear frenz,
i hav a grt problem here.
i am working on a windows application where i need to open a form2.vb to search records, which should be displayed on form1.vb.
the problem is dat i hav to use 2 data sets in order to navigate among the searched records.
how do i design my application so that without using multiple data sets, i can search records in 1 form/window and the results r displayed in anoder window.?
this is wat i want to accomplish:
1. form1.vb has various textboxes and other controls to display record fields.
2. when click on "search" button on form1.vb, a new window/form ie. search.vb opens up.
3. user enters search criteria on search.vb and cliks on the "find" button.
4. after find button is cliked, the "search.vb" form closes and the searched records are displayed on form1.
problem1: the problem lies ind fact dat wen the searched records are displayed on the form1.vb, cliking on the navigation buttons lyk first, next etc. displays the original complete database records, nd not the searched records. The only solution obtained till now is using 2 datasets, wich i want to avoid
problem2: on wat event of form1 or search.vb should i code the query for searching?
i'll be happy to expand on the problem in case this seems insufficient.
|
|
|
|
|
Try to clear the dataset and load the new searched records and after your work completed load all the records.
3. user enters search criteria on search.vb and cliks on the "find" button.
Your task itself has answer for the problem2:
Include the search code in the button(find) click event of search.vb
Hope i answered the question
Ahamed Azeem
software Programmer
|
|
|
|
|
see, if i work on a single page then the searched records get loaded on to the same dataset and i can easily navigate b/w them. to ghat i code on this button, doeso bak to the original dataset, i hav to press a VIEW ALL button.
but the problem is dat wen im using a seperate page to search records and even if i code on the FIND button, then the query that i code on this button, does not get returned to the "form1.vb" page.
This is wat i hav already tried:
1. i declare a string on SEARCH.vb page :
Line1:- Public srch_query As String
2. then i phrase the query according to the parameters defined by the user:
Line2:- srch_query="select * from emp where ......."
3. now to check whether a criteria has been searched, i do the following:
Line3:- Dim Query As String = Search.srch_query
Line4:- cmd=new sqlcommand(query,cn)
followed by rest of the code.
But the problem is that whenever Search.srch_query is called in Line3, it only checks the value from Line1 ie declaration part, and does not even go to the Line2, and so throughout the session, the value of query = " ".
what i mean to ask dat wat should i do so that the value of the query is returned and not the initial declaration where srch_query = " ".
after this, the query string is treated as a blank and the records do not get searched.
|
|
|
|
|
Create an object for the form1 in form 2 and call the same dataset from form2 to load the record onto the same dataset
dim frm as new form1
da.fill(frm.ds)
I have tried and working fine in single dataset
Ahamed Azeem
software Programmer
|
|
|
|
|
We have a Windows Service developed in VB.NET and using .Net 2.0 framework running on Windows server 2003 sp2.
Basically, our service uses serial port objects, some IO logging to text file and of course database calls. We also have a ping logic that pings like about 50 machines in a loop
within a timer. The timer that I use is of System.Timers.Timer type.
This service crashes about once a day. We get the following description for ".Net 2.0 Runtime error,event ID 1000" on the Event Viewer:
Faulting application readerservice.exe, version 1.0.0.0, stamp 49de72c5, faulting module msvcr80.dll, version 8.0.50727.1433, stamp 471eb5ae, debug? 0, fault address 0x000150d8.
We logged the unhandled exception and this is what we found just before the application crashed.
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._TimerCallback.PerformTimerCallback(Object state)
Any help on this would be deeply appreciated.
|
|
|
|
|
I forgot to mention that our servive is running on VM Ware on Windows server 2003 sp2.I am not sure that this is of importance but wanted to mention.
|
|
|
|
|
Hi,
looks like your timer's Elapsed handler is throwing an exception which you did not catch.
I would:
- add one overall try-catch catching the Exception and showing all of its information (ToString!)
- run the debug version of it
- shorten the interval to get it sooner and/or more frequently
then watch the line numbers mentioned in the exception.
Most likely cause is something is failing because you don't have the necessary privileges, and/or some service is temporarily out of order and your code isn't coping with that.
|
|
|
|
|
I want to get the field of HTML into the database
i am using a script which checks the active url in the current IE window and out of that i can praise the one i want to my database.
after a search i am able to do the following and got the active url from the internet explorer using the below script
Dim shellWins As SHDocVw.ShellWindows
Dim explorer As SHDocVw.InternetExplorer
shellWins = New SHDocVw.ShellWindows
For Each explorer In shellWins
Debug.Print(explorer.LocationName)
Debug.Print(explorer.LocationURL)
Me.Label1.Text = explorer.LocationName
Me.Label2.Text = explorer.LocationURL
MsgBox(Me.Label1.Text & "-" & Me.Label2.Text)
If Me.Label1.Text = "Services Network" Then
Me.Label1.Text = explorer.LocationName
Me.Label2.Text = explorer.LocationURL
MsgBox(Me.Label1.Text & "-" & Me.Label2.Text)
' Now here i want to extract the url source code and then search for various content in that
just like parsing the HTML
End If
Next
shellWins = Nothing
explorer = Nothing
kindly if any example available for getting content from HTML
|
|
|
|