Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
A

Arif Liminto

@Arif Liminto
About
Posts
55
Topics
33
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • using timer to refresh gridview
    A Arif Liminto

    Hi guys, I am still newbie in asp.net I want to refresh gridview every 30 seconds using timer and I have got the problem with calling non-static function to databind the gridview. here is example of my code Timer AlertTimer = null; protected void Page_Load(object sender, EventArgs e) { //load to gridviewAlarm for the first time Alert a = new Alert(); DataTable dt = new DataTable(); a.LoadAlarmFromDB(ref dt); gridviewAlarm.DataSource = dt; gridviewAlarm.DataBind(); AlertTimer = new Timer(); AlertTimer.Start(); AlertTimer.Elapsed += new ElapsedEventHandler(AlertTimer_Elapsed); AlertTimer.Interval = 30000; } public static void AlertTimer_Elapsed(object source, ElapsedEventArgs e) { Alert a = new Alert(); DataTable dt= new DataTable(); a.LoadAlarm(ref dt); **//in here how to call bindGridView() // i have tried those below //but it doesnt work** //Test_MasterPage M = new Test_MasterPage(); //M.bindGridView(); } public void bindGridView() { gridviewAlarm.DataSource = ""; gridviewAlarm.DataBind(); gridviewAlarm.DataSource = m_AlarmDT; gridviewAlarm.DataBind(); } how do i call non static function in static function? thanks so much for the help Regards, Arif

    ASP.NET help tutorial question csharp asp-net

  • how to pass parameters to timer handler in asp.net
    A Arif Liminto

    thank so much

    ASP.NET csharp asp-net tutorial

  • how to pass parameters to timer handler in asp.net
    A Arif Liminto

    Hi , iam still newbie in asp.net I have no idea how to pass parameter to event handler in timer this the code that i have got private Timer Alert = null; protected void Page_Load(object sender, EventArgs e) { Alert = new Timer(); Alert.Start(); Alert.Elapsed = new ElapsedEventHandler(Alert_Timer_Elapsed); AlertTimer.Interval = 30000; } private static void AlertTimer_Elapsed(object source, ElapsedEventArgs e) { } i want int alerttimer_elapsed has a string / object variable as parameters but i am confused how to do it. thanks guys

    ASP.NET csharp asp-net tutorial

  • All pipes intances are busy
    A Arif Liminto

    Hi I got a project which involves interprocess communication. I uses pipes because it's only happend in one machine. It seems everything should be perfect. However, When I try to connect The Client and The Server. I always have an Error number 231 ( All pipe instances are busy) when I try to create file in client side. Client --> Create File, Write File Server --> Create Named Pipes, Read File here is some of the code in my programs

    m_hPipeHandle = INVALID_HANDLE_VALUE;
    m_hPipeHandle = CreateFile(ISOCOMSPIPE,GENERIC_WRITE,FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);

    if(m_hPipeHandle == INVALID_HANDLE_VALUE)
    {
    int iRet = GetLastError();
    printf("Error number %d",iRet);
    }

    closeHandle(m_hPipeHandle);

    Is there anything wrong in the attributes/ missing attributes when I want to create the file ? Thx

    C / C++ / MFC sysadmin help question

  • disable end program notification in console application
    A Arif Liminto

    I changed the way my program works. instead, waiting for period of time, then shutdown I keep it loop until keyboard event occurs or user press close and I discovered that there were some memory leaks in my program. I fixed the memory leak, change the program flow and done Anyway, thanks for your help Regards, Arif Liminto

    C / C++ / MFC c++ debugging help tutorial question

  • disable end program notification in console application
    A Arif Liminto

    thanks I've fixed that one

    C / C++ / MFC c++ debugging help tutorial question

  • disable end program notification in console application
    A Arif Liminto

    Hi, I am still a newbie in MFC I 've got a problem with my console application program I use one thread in there , which is I use CWinThread and it terminates when time is equal to timeout but I need to handle if the user want to terminate immediately in the console application so the way I did is I create this function

    BOOL WINAPI ConsoleHandler(DWORD CEVENT)
    {
    switch(CEVENT)
    {
    case CTRL_CLOSE_EVENT://if user shutdown immediatelly
    myClass.CleanUpThread();

    	break;
    }
    return TRUE;
    

    }

    so when the user want to immediatelly, it will go to that function and clean up the thread however, everytime, I test and debug, I always windows ballon said that "windows cannot end this program, it may need more time to complete an operation" How to disable that ballon? so i dont want user to see that one, and the program will wait until the thread is cleared. Thanks so much,

    C / C++ / MFC c++ debugging help tutorial question

  • dataset to formview
    A Arif Liminto

    yeah I've stepped through the code i also try to add some debug code

    bool bResult = false;

    if(myDataAdapter.Fill(myDataSet) > 0)
    {
    bResult = true;
    }

    and I monitor the value of bResult, the result is true. if I use GridView,it works perfectly, so I dont think there is a mistake in transferring from database to dataset, I suspect the problem when transfering from DataSet to FormView, which i use the same mechanism when i use GridView set the data source -> FormView.DataSource = DataSet; bind the data -> FormView.DataBind(); is there anything that I need to add more? Thanks so much

    ASP.NET csharp asp-net database help question

  • dataset to formview
    A Arif Liminto

    Hi, I am still a newbie in ASP.net, sorry if I am asking stupid message. I am trying to develop some website using asp.net 2.0 and I currently have some difficulity to use one of the ToolBox called FormView for displaying the data from database I want to transfer from microsoft access to FormView here is the code

    OleDbConnection myConnection = new OleDbConnection(myConnectionString);
    myConnection.Open();

    OleDbCommand myCommand = new OleDbCommand();
    myCommand.Conn = myConnection;
    myCommand.CommandText = "SELECT * FROM [USER] WHERE UserName = @UserName";
    myCommand.Parameters.AddWithValue("@UserName",sUserName);

    OleDbDataAdapter myAdapter = new OleDbDataAdapter(myCommand);

    myDataAdapter.Fill(myDataSet);

    FORM_View_Users.DataSource = myDataSet;
    FORM_View_Users.DataBind();

    myConnection.Close();

    I think I did with the correct way because when I tried to run the website, I did not get any exception error, However, I couldn't see the formview, it just blank . Is there any attribute that I need to fill in so I can see the data in the Form_View ? thanks

    ASP.NET csharp asp-net database help question

  • nested master page problem
    A Arif Liminto

    Hi, I am still a newbie in ASP.net development, I try to learn about nested master page, and I got this problem Cannot find ContentPlaceHolder 'ContentPlaceHolderUser' in the master page '/OnlinePrayer/MasterPage/AdminUser.master' I have done some research in internet, but until now, I have not got the right solutions. basically, in my website, there are 2 master page : AdminUser.master and User.master and AdminUser is child of User, In User.Master , I've got this following code

    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="User.master.cs" Inherits="MasterPage_User" %>
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>UserPage</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <asp:contentplaceholder id="ContentPlaceHolderUser" runat="server">
    </asp:contentplaceholder>
    </div>
    </form>
    </body>
    </html>

    and in AdminUser.master, i've got this code

    <%@ Master Language="C#" MasterPageFile="~/MasterPage/User.master" AutoEventWireup="true" CodeFile="AdminUser.master.cs" Inherits="MasterPage_AdminUser" %>

    <asp:Content ID= "SubContent1" contentplaceholderid="ContentPlaceHolderUser" runat="server">
    </asp:Content>

    I thought that I had define ContentPlaceHolderUser in User.Master, but I dunno why I still got this error? in Admin.Master I would be grateful if you could give me feedbacks about my problems, thanks

    ASP.NET csharp help html asp-net sysadmin

  • Error LNK2005 ( extern variable)
    A Arif Liminto

    Hi thanks men for the solution, it works perfectly

    C / C++ / MFC c++ help

  • Error LNK2005 ( extern variable)
    A Arif Liminto

    Hi ,I am new in mfc and c++, and currently I have got problem with this kind of error basically , i have to file get.cpp and send.cpp and i want to share variable across that files and i thought we can use keyword "extern" so here is my code in send.h int g_iEnabled class csend { ...... } in get.h extern int g_iEnabled class cget { .... } is that the rightway to share variable across multiple files thanks for your help bye :-D

    C / C++ / MFC c++ help

  • system in windows ce
    A Arif Liminto

    HI, i am currently developing application in windows ce using c++ language and i need to be able to execute command line in my program i ever use system(String) in vs2005 with no problem in xp however, in windows ce, i always get error that system identifier is not found do u guys know what keyword that has same functionality with system? thanks Arif Liminto

    C / C++ / MFC help c++ question

  • MailSlot across the network
    A Arif Liminto

    HI, I've got problem with CMAILSLOT I create two seperate programs that one is check if there is something wrong in data and will call another program to ring, and it located in server one is alarm that will ring if it called, located in my comp The strange is if I use string like \\.\\mailslot\test\testalarms as initial mailslot, it works well means that it act like local but if I use \\ipaddress\\mailslot\test\testalarms as initial mailslot, it doesnt work anyway, I test it using same computer, going to server , i use remote desktop and run the program from there, other one,just run from my comp, any idea about this one thanks very much Regards, Arif Liminto

    C / C++ / MFC sysadmin help

  • Convert total seconds to date time format
    A Arif Liminto

    Thanks Guys, It works

    C / C++ / MFC c++ help tutorial

  • Convert total seconds to date time format
    A Arif Liminto

    HI, I am doing visual c++ 2003, and I want to ask about how to convert the data type format ( TotalSeconds) to date format, I know how to convert from date format to total seconds but how to convert in the reverse way, I don't know this is the way that I convert from date format to total seconds Ctime Now = CTime::GetCurrentTime(); CTime UCT(0); CTimeSpan Diff = Now - UCT; return Diff.GetTotalSeconds(); but how to convert in the reverse way I would be grateful if you guys can help me :) Regards, Arif Liminto

    C / C++ / MFC c++ help tutorial

  • grab the result from sql query using visual c++ 2003
    A Arif Liminto

    Hi, I've got problem with MFC. I tried to run the query like this, and I am using recordset select count(*) from dbo.Vehicle and how to grab the value of the count(*)? I found one way, but its running very slow by using loop int inc = 0; query = select * from dbo.vehicle while(records is not eof or record is bof) { inc++; records.movenext() } printf("Total count is %d",inc); do you have any idea how to grab the value using the count(*) instead of running the loop Thanks Arif

    C / C++ / MFC c++ database help tutorial question

  • Create two executable files ( one GUI and one command line )
    A Arif Liminto

    HI, Sorry for the late reply, I decided to create class that inherits from commandlineinfo and until now, I dont have any issues Anyway, Thanks for your help Regards, Arif Liminto

    C / C++ / MFC c++

  • Create two executable files ( one GUI and one command line )
    A Arif Liminto

    Thanks for the quick reply, I 've put all of my core functionalities in different classes, and the problem is I don't know how to creating command line executable files, because when the first time, I create MFC Dialog Based Not Command Line Application, Any suggestion? Thanks Arif

    C / C++ / MFC c++

  • Create two executable files ( one GUI and one command line )
    A Arif Liminto

    Hi, in MFC 2003, Is that possible to create two executable files (.exe) one for GUI and one for command line, so I can choose to run the application via GUI or via command line Thanks Arif

    C / C++ / MFC c++
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups