|
I am, thanks for the help, using this idea i ran the emails in my database through regular expression validation and got back a list of the incorrectly formatted emails.
Thank you so much
|
|
|
|
|
Exactlly
when u insert email address to databasem please valid with regular expression. so dont have any fear when u retrieve data from the Database to send email
this is good for u.
Cheers
RRave
MCTS,MCPD
|
|
|
|
|
fellas i need my program to be MTATHREAD in my main method
but when i add the media player control in i get the following error
ActiveX control '6bf52a52-394a-11d3-b153-00c04f79faa6' cannot be instantiated because the current thread is not in a single-threaded apartment.
any body know how to get around it
|
|
|
|
|
jimmy2shoes wrote: but when i add the media player control in i get the following error
ActiveX control '6bf52a52-394a-11d3-b153-00c04f79faa6' cannot be instantiated because the current thread is not in a single-threaded apartment.
Well, you don't have a choice there. You either set the STA or you don't use the Media Player control.
Why do you have to use MTA?? You can create threads yourself all you want without it...
|
|
|
|
|
hi thanks for getting back to me friend
i have to MTA as i am using the Intel Mobile SDK to monitor Power and Network events and as far as there web site goes i have to use MTA in order for it to function correclty.
i have ran my program with STA and the events do not work
thanks
|
|
|
|
|
In that case, you can try this. You have to keep the Main in your code STA or you lose ActiveX controls. Start a seperate thread, setting its Apartment to MTA before you actually Start the thread. All of your code using this library would have to be running under this thread in order to work (per Intel). I don't know if it'll work, and it might take a large rewrite of your code to find out.
Your best source of information on this problem is actually going to be Intel.
|
|
|
|
|
Yes, things like that can work. We once did such things.
The way I understand it, you can choose the overall MTA/STA status, and then deviate from
it for each new thread you create.
There is one little caveat: for each thread you can set the appartment model only once,
but that should pose no problem.
PS: I don't recall how prefabricated threads (ThreadPool, BackgroundWorker, ...)
behave in this matter.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
trying to write a c# datagridview wrapper class, and i'm having problems setting my form object to the class dgv wrapper.
error: "Cannot implicitly convert type 'System.Windows.Forms.DataGridView' to 'test.Grid'. An explicit conversion exists (are you missing a cast?)"
form code:
breaks on:
"Grid i_grid_o;
i_grid_o = dataGridView3;
i_grid_o.UpdateGrid(i_grid_o);"
wrapper class code:
"using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace test
{
class Grid : DataGridView
{
DataGridView i_grid_o = new DataGridView();
//ctor
public Grid()
{
}
public void UpdateGrid(DataGridView a_grid_o)
{
i_grid_o = a_grid_o;
MessageBox.Show(a_grid_o.ToString());
//DataGridView a_grid_o, a_table_o
//a_grid_o.Update(a_table_o);
}"
anyone can help, will greatly appreciate it!
|
|
|
|
|
Member 3946582,
You just need to do: i_grid_o = (Grid)dataGridView3;
Also, on a side note, you don't need to create a DataGridView in your Grid class. You could change your code to:
private DataGridView _gridView
public Grid(DataGridView dataGridView)
{
_gridView = dataGridView;
}
Then, when ever you want to create a Grid object, just do:
Grid i_grid_o = new Grid(dataGridView3);
i_grid_o.UpdateGrid();
Regards,
Gareth.
modified on Friday, February 15, 2008 1:14 PM
|
|
|
|
|
thanks! That darn casting! You guys are great..
|
|
|
|
|
Hey all,
I have a simple listview question. When a row is clicked, I can get info from a particular column like this:
listView1.FocusedItem.SubItems[0].Text
But how can I get the column dynamically?
Thanks!
PHP and C# Developer for Magezine Publishing Ltd
|
|
|
|
|
I don't have a lot of experience with ListView, but after a quick glance at the API, in your Click method, I think you can use the event args 'e' like:
int colIndex = e.Columns.Index();
I might be wrong though, like I said, never used it much.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
BenGriffiths wrote: But how can I get the column dynamically?
What does that mean? Get the column they clicked?
led mike
|
|
|
|
|
Yep, i need to get the index of which ever one was clicked
|
|
|
|
|
My suggestion any good? That was what I was assuming.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
I couldnt figure that way out :s lol, still learning
|
|
|
|
|
First generate the click method: Go into the ListView's events in the form design or if you've coded the ListView:
listView1.ColumnClick += new ColumnEventHandler(listView1_ColumnClicked);
Half way through writing that, Intellisense will say press tab to auto generate method.
Then inside the method, the code I previously wrote should do the job.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
Ah ok, I think I have figured it out now, thanks
|
|
|
|
|
|
Hi Guy
when u click in the column u can get from the EventArgs.
try like this EventArgs e;
e.Column.Index;
i hope help this
Cheers
RRave
MCTS,MCPD
|
|
|
|
|
I have some problems with reading and writing to an Intranet directory. I always get an permission exception.
The executable file is shared on an NTFS network volume. There is no problem to read and write files directly in executable home directory.
When I try to read/write outside the folder I get an exception.
The next step was to create an PermissionSet but I got an Security Exception.
How I can read/write files
thanks in advance
|
|
|
|
|
|
i'm a beginner in c#. now i'm doing a water model by using bump mapping. i used refer to http://www.riemers.net[^]to do this. the problem is, the code for the bump mapping is in HLSL code. How can i do the code in c#?
[img]http://img488.imageshack.us/img488/6241/signaturesakirahku9.jpg[/img]
|
|
|
|
|
|
You can't, unless you want to write a horribly slow software renderer, which involves a lot more work than learning HLSL/GLSL/Cg (any of those shader languages)+
For more information about graphics programming I suggest you better take a look at those sites:
http://www.gamedev.net[^]
http://forums.xna.com[^]
modified 12-Sep-18 21:01pm.
|
|
|
|