|
The data (characters) of the string are not relevant here, the struct only has something that knows where the data is, call it a reference, a pointer, an indirection, or whatever you like; it needs 4 or 8 bytes to do that depending on the kind of Windows it is built for.
Luc Pattyn [Forum Guidelines] [My Articles]
- 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 the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I writing some application that have reference of Microsoft office outlook.
My application can work with office 2007 or office 2003.
When i work with office 2007 all work fine - and i don't have any problem to control the outlook.
But with office 2003 i cant control the outlook even if i install the interop assembly of office 2003.
I think that the problem is in the loading Interop assembly - because i compiled the setup file with office 2007.
Someone can help ?
I don't know how to solve this problem.
|
|
|
|
|
How to retrieve data from sqldatabase to gridview's top row.
now i can display data from databse to gridview,but i need to retreve last updated data from database to gridview's top row.
source code:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Style="z-index: 120;
left: 59px; position: absolute; top: 457px" CellPadding="4" ForeColor="#333333" GridLines="None" Height="170px" Width="890px" AllowSorting="True" BorderWidth="2px" CellSpacing="5">
<Columns>
<asp:BoundField DataField="date" HeaderText="Date" InsertVisible="False" />
<asp:BoundField DataField="description" HeaderText="Description" />
<asp:HyperLinkField DataNavigateUrlFields="url" DataTextField="title" HeaderText="Click here to read more"
NavigateUrl="url" Target="_parent" />
<asp:BoundField DataField="country" HeaderText="Country" />
<asp:BoundField DataField="city" HeaderText="City" />
<asp:BoundField DataField="author" HeaderText="Author" />
</Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#CCCCFF" ForeColor="#333333" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
c# code:
protected void Page_Load(object sender, EventArgs e)
{
string m;
m = Request.QueryString["a"].ToString();
TextBox1.Text = m;
if (!IsPostBack)
show();
}
private void show()
{
adp = new SqlDataAdapter("select date ,title ,url ,description, author, city,country from postupdation ", con);
adp .Fill (ds);
GridView1.DataSource = ds;
GridView1.DataBind();
// GridView2.Visible = true;
}
can any one pls help me
|
|
|
|
|
You are not enough clear in your question!What concretely you want to do with your data?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
How to associate event handler with the Idle event in c#?
thanks
|
|
|
|
|
public static event EventHandler Idle
private void Application_Idle(Object sender, EventArgs e)
{
MessageBox.Show("You are in the Application.Idle event.");
}
|
|
|
|
|
I tried this. But with this how will it attach the Application_Idle to Applications Idle processing?
thanks
|
|
|
|
|
saksp wrote: How to associate event handler with the Idle event in c#?
?? why would it be different from any other event? try Application.Idle+=myIdleHandler;
Luc Pattyn [Forum Guidelines] [My Articles]
- 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 the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Another example of trying different things in a test app. I swear, some of these guys really should reevaluate their current career path...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Yep. Weekend programmers resemble weekend traffic. Quantity down, quality down.
Luc Pattyn [Forum Guidelines] [My Articles]
- 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 the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hello,
I am using table layout panel so my C# application UI looks better even if we change screen resolution. My all controls are docked fill in different cells of tableLayoutPanel. I am 1280 by 1024 resolution to develop UI.
If i change resolution to 800 by 600 then the size(height) of button reduces extremely and text also doesn't fit in button but the other controls like text box seems to be ok.
How do i make sure that the button size reduces according to the parent control and also button text should be visible?
Thanks in Advance.
|
|
|
|
|
Find the height and width of the button at its smallest possibly size where the text is still visible. Then write a simple script saying that it can't be smaller.
hmmm pie
|
|
|
|
|
Hi!
Design your layout in 800 by 600 resolution. and then move to 1280 by 1024
Thanks
Develop2Program & Program2Develop
|
|
|
|
|
Thanks all.
Designing in lower resolution works for me.
|
|
|
|
|
I want to create a Console Application in C#.NET 2.0
I am trying to create a class in C# that Prints an Output Hello but that class don't have Main()
I think this can be created by using keyword "static"
This is the CODE
using System;
class StaticTest
{
static void A()
{
Console.WriteLine("Hello!");
}
}
THANKS
|
|
|
|
|
One class in your project must have a Main. Main is the entry point into your application.
Any class with a Main can be the StartUp object.
The Main can return void or int.
It can either be parameterless or take a string array.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
You're still going to have to call A() from your Main though so what's the point of this?
besides, what is the question?
|
|
|
|
|
hello friends i'm new to this forum... i'm working on a website and using vs2005. the screen i designed on the vs2005 is different from the screen dat i view on the browser. i hv tried all the browsers like ie, firefox, opera nd chrome. bt the prblm still persists... m using windows vista, is dat the cause?? please help me.
|
|
|
|
|
maheshsahini wrote: is dat the cause
Don't know what dat is. You are going to supply some more details than "the srenn dat I view"
There are a bunch of developers on the forums, no psychics.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i added a menu bar and a tree view on the LHS of my page, which is visible in the master page and home page as well, bt wen i run the page on the browser they r not visible..
|
|
|
|
|
How can I have/create a DataGridView having DataGridViewColumns with multiline textboxes?
(The standard DataGridViewTextBoxColumn cell are single line TextBox objects.)
Is there some way to access the properties of the underlying TextBox objects in a DataGridViewTextBoxColumn (i.e., to change the Multiline property to true)? Or, do I have to create a new class inheriting from DataGridViewColumn ?
Thanks!
Tom
|
|
|
|
|
Do you know when Googled 'datagridviewtextboxcell multiline'
The very first hit seemed to have an answer that would work. Or at the very least be a damned good place to start.
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.”
|
|
|
|
|
I swear I searched all over... (i.e., I'm embarrassed!)
The sure was a good start!
Thanks, Henry.
Tom
|
|
|
|
|
Hi i have the code
using DTS;
private void DTS_Eliminar()
{
Package2Class pck = new Package2Class();
object pvarper = null;
string server = ConfigurationManager.AppSettings.Get("server_SQL");
pck.LoadFromSQLServer(server, null, null,
DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection,
null, null, null,
"DTS_Informix_a_SQL_Periodos_Vigentes", ref pvarper);
pck.Execute();
pck.UnInitialize();
}
but i need this
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
Package2Class pck = new Package2Class();
object pvarper = null;
string server = ConfigurationManager.AppSettings.Get("server_SQL");
pck.LoadFromSQLServer(server, null, null,
DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection,
null, null, null,
"DTS_Informix_a_SQL_Periodos_Vigentes", ref pvarper);
e.Result = pck.Execute(); pck.UnInitialize();
}
but show the next error
"Cannot implicitly convert type 'void' to 'object'"
Help me
|
|
|
|
|
What's the return type of pck.Execute(); ? Void at a guess.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|